<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            border: 1px solid #ccc;
        }
        [class^='box'] {
            border-radius: 20px;
        }
        .active {
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3" id="demo"></div>


    <script src="./common/util.js"></script>
    <script>
        _addClass("div","active");
        // _removeClass("div","active");
        _addClass(".box2","active");
        _addClass("#demo","active");


    </script>
</body>
</html>